Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 1 - Appearance Manager Reference / Appearance Manager Functions
Coordinating Colors and Patterns With the Current Theme /


SetThemeWindowBackground

NEW WITH THE APPEARANCE MANAGER

Sets the Appearance-compliant color or pattern that the window background will be repainted to when PaintOne is called.

pascal OSStatus SetThemeWindowBackground (
                     WindowPtr inWindow,
                     ThemeBrush inBrush,
                     Boolean inUpdate);
inWindow
On input, a pointer to a window.
inBrush
A value representing the pattern or color to which the window background will be set; see "Appearance-Compliant Brush Type Constants".
inUpdate
A Boolean value. If true, the content region of the window is to be invalidated and the window erased. If false, the window background is to be set but no drawing will occur on screen.
function result
A result code. The result code appearanceBadBrushIndexErr indicates that the brush constant passed was not valid. For a list of other result codes, see "Result Codes".
DISCUSSION
The SetThemeWindowBackground function sets the color or pattern to which the Window Manager will erase the window background.

The constant in the inBrush parameter can represent a color or pattern, depending on the current theme. Because it could specify a pattern, remember to save and restore the pnPixPat and bkPixPat fields of your graphics port when saving the text and background colors. Because patterns in the bkPixPat field override the background color of the window, call the Window Manager function BackPat to set your background pattern to a normal white pattern. This will ensure that you can use RGBBackColor to set your background color to white, call the Window Manager function EraseRect, and get the expected results.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998